<?php

namespace Modules\DataCheck\Enums;

use Modules\DataCheck\Enums\Tratis\EnumExtend;

/**
 * 原始文化文件任务枚举
 */
enum TaskSourceFileEnum: int implements Enum
{
    use EnumExtend;

    //状态，1:待导入，2:导入中，3:导入成功，4:导入失败
    case WAIT = 1;
    case RUNNING = 2;
    case SUCCESS = 3;
    case FAILED = 4;

    /**
     * 获取描述
     * @return string
     */
    public function message(): string
    {
        return match ($this) {
            self::WAIT => '待导入',
            self::RUNNING => '导入中',
            self::SUCCESS => '导入成功',
            self::FAILED => '导入失败',
        };
    }
}